package yag.battle.pet.model;

import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Created by alex on 03.09.14.
 */
public class PetMapper implements RowMapper<Pet> {
    @Override
    public Pet mapRow(ResultSet resultSet, int i) throws SQLException {
        Pet pet = new Pet(resultSet.getInt("mood"));
        pet.setId(resultSet.getInt("id"));
        return pet;
    }
}
